package com.kaifamiao.wendao.dao;

import com.kaifamiao.wendao.utils.DataSourceFactory;
import org.apache.commons.dbutils.QueryRunner;

import javax.sql.DataSource;

public  abstract class BaseDao<E,P> implements Dao<E,P> {

    protected QueryRunner runner;

    protected BaseDao(){
        super();
        DataSourceFactory factory = DataSourceFactory.getInstance();
        DataSource dataSource = factory.getDataSource();
        runner = new QueryRunner(dataSource);
    }
}
